package com.mysoft.gfyx.marketdevelop.controller.export;

import com.alibaba.fastjson.JSON;
import com.mysoft.framework.modeling.dataapi.ExportDataApi;
import com.mysoft.framework.modeling.dto.LoadDataParams;
import com.mysoft.framework.mvc.api.Controller;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.common.util.LogUtil;
import com.mysoft.gfyx.marketdevelop.service.InspectTakeLandService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@PubService(value = "/inspectTakeLand", prefix = RequestPrefix.API, method = {})
@Tag(name = "拿地信息-API")
public class LandExportDataApiController extends Controller implements ExportDataApi {
    @Resource
    private InspectTakeLandService inspectTakeLandService;

    @Autowired
    private LogUtil logUtil;

    @Override
    public List<Map<String, Object>> export(@RequestBody LoadDataParams options) {
        logUtil.info("land-export request", JSON.toJSONString(options));
        return inspectTakeLandService.export(options);
    }
}
